package cn.xiqi.cms.hibernate.service;

import java.util.List;

import cn.xiqi.cms.hibernate.DAO.UsrDAO;
import cn.xiqi.cms.hibernate.beans.Usrinfo;

public interface UsrService {
	public int insert(Usrinfo record);
	public boolean delete(Usrinfo record);
	public boolean update(Usrinfo record);
	public Usrinfo getByID(int id);
	public List<Usrinfo> getByDepart(String depart, int page, int size);
	public List<Usrinfo> getByName(String name, int page, int size);
	public List<Usrinfo> getAll(int page, int size);
	public List<Usrinfo> getByRole(int roleID, int page, int size);
	public List<Usrinfo> getByStat(int stat, int page, int size);
	public List<Usrinfo> getByLevel(int level, int page, int size);
	public int getCount(String type);
	public void setDao(UsrDAO dao);
	public boolean setRole(int userID, int roleID);
	public boolean setStat(int userID, int stat);
	public boolean setLevel(int userID, int level);
}
